/**
* @author AlbertDarren
* @contact 2563491540@qq.com
*/
#include <bits/stdc++.h>

using namespace std;
const int slen=12;
int main_70()
{
    int scores[5]={0},score=0;
    int n,x=0,y=0;
    char xi[slen],yi[slen];
    memset(xi,0,sizeof(xi));
    memset(yi,0,sizeof(yi));
    scanf("%d",&n);
    unordered_map<string,bool> pos;
    for (int i=0;i<n ;++i )
    {
        scanf("%s %s",xi,yi);
        pos[string(xi)+","+string(yi)]=true;
    }
    for (auto p:pos)
    {
        int comma=p.first.find(",");
        x=stoi(p.first.substr(0,comma),nullptr);
        y=stoi(p.first.substr(comma+1),nullptr);
        string left=to_string(x-1)+","+to_string(y);
        string right=to_string(x+1)+","+to_string(y);
        string up=to_string(x)+","+to_string(y+1);
        string down=to_string(x)+","+to_string(y-1);
        if (pos.find(left)!=pos.end()&&pos.find(right)!=pos.end()&&pos.find(up)!=pos.end()&&pos.find(down)!=pos.end())
        {
            score=0;
            for (int i=x-1;i<=(x+1);i+=2 )
            {
                for (int j=y-1;j<=(y+1) ;j+=2 )
                {
                    if (pos.find(to_string(i)+","+to_string(j))!=pos.end())
                    {
                        ++score;
                    }
                }
            }
            ++scores[score];
        }
    }
    for (int i=0;i<5 ;++i )
    {
        printf("%d\n",scores[i]);
    }
    return 0;
}
